package com.frog.rss.view;

import android.content.Context;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

public class RssListView extends ViewGroup {
	private ImageView starView;
	private TextView titleView;
	private TextView descriptionView;

	public RssListView(Context context) {
		super(context);
		starView = new ImageView(context);
		titleView = new TextView(context);
		descriptionView = new TextView(context);
		LinearLayout container = new LinearLayout(context);
		container.setLayoutParams(new LinearLayout.LayoutParams(
				ViewGroup.LayoutParams.FILL_PARENT,
				ViewGroup.LayoutParams.WRAP_CONTENT));
		starView.setLayoutParams(new ViewGroup.LayoutParams(
				ViewGroup.LayoutParams.WRAP_CONTENT,
				ViewGroup.LayoutParams.WRAP_CONTENT));
		container.addView(starView);
		LinearLayout textContainer = new LinearLayout(context);
		textContainer.setLayoutParams(new LinearLayout.LayoutParams(
				ViewGroup.LayoutParams.FILL_PARENT,
				ViewGroup.LayoutParams.WRAP_CONTENT));
		textContainer.setOrientation(LinearLayout.VERTICAL);
		titleView.setLayoutParams(new ViewGroup.LayoutParams(
				ViewGroup.LayoutParams.WRAP_CONTENT,
				ViewGroup.LayoutParams.WRAP_CONTENT));
		titleView.setText("title");
		textContainer.addView(titleView);
		descriptionView.setLayoutParams(new ViewGroup.LayoutParams(
				ViewGroup.LayoutParams.WRAP_CONTENT,
				ViewGroup.LayoutParams.WRAP_CONTENT));
		descriptionView.setText("descriptionView");
		textContainer.addView(descriptionView);
		container.addView(textContainer);
	}

	@Override
	protected void onLayout(boolean arg0, int arg1, int arg2, int arg3, int arg4) {

	}

}
